<!DOCTYPE html>
<html class="x-admin-sm">
{include file='public/head'/}
<style>
    .layui-form-item .layui-input-inline {
        width: 600px;
    }
</style>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form">
            <div class="layui-form-item">
                <label for="" class="layui-form-label">
                    网站域名
                </label>
                <div class="layui-input-inline">
                    <input value="{$info.web_url}" type="text" name="web_url" required=""
                           lay-verify="" autocomplete="off"
                           class="layui-input"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    协同办公网址</label>
                <div class="layui-input-inline">
                    <input value="{$info.collaborative}" type="text" name="collaborative" required=""
                           lay-verify="" autocomplete="off"
                           class="layui-input"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    客服电话</label>
                <div class="layui-input-inline">
                    <input value="{$info.customer}" type="text" name="customer" required="" lay-verify="nikename"
                           autocomplete="off" class="layui-input"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    纪检监督电话</label>
                <div class="layui-input-inline">
                    <input value="{$info.supervise}" type="text" name="supervise" required="" lay-verify=""
                           autocomplete="off"
                           class="layui-input"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    清欠投诉电话</label>
                <div class="layui-input-inline">
                    <input value="{$info.supervise}" type="text" name="supervise" required="" lay-verify=""
                           autocomplete="off"
                           class="layui-input"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    地址</label>
                <div class="layui-input-inline">
                    <input value="{$info.address}" type="text" name="address" required="" lay-verify=""
                           autocomplete="off"
                           class="layui-input"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    备案号</label>
                <div class="layui-input-inline">
                    <input value="{$info.icpn}" type="text" name="icpn" required="" lay-verify="" autocomplete="off"
                           class="layui-input"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    ©</label>
                <div class="layui-input-inline">
                    <input value="{$info.c}" type="text" name="c" required="" lay-verify="" autocomplete="off"
                           class="layui-input"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    技术支持</label>
                <div class="layui-input-inline">
                    <input value="{$info.technical_support}" type="text" name="technical_support" required=""
                           lay-verify="" autocomplete="off"
                           class="layui-input"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    联系方式</label>
                <div class="layui-input-inline">
                    <input value="{$info.contact_details}" type="text" name="contact_details" required="" lay-verify=""
                           autocomplete="off"
                           class="layui-input"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    邮箱</label>
                <div class="layui-input-inline">
                    <input value="{$info.mailbox}" type="text" name="mailbox" required="" lay-verify="email"
                           autocomplete="off"
                           class="layui-input"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <button class="layui-btn" lay-filter="add" lay-submit="">编辑</button>
            </div>
        </form>
    </div>
</div>
<script>
    let infoEditUrl = '/admin/info/infoEdit'
    layui.use(['form', 'layer', 'jquery'],
        function () {
            $ = layui.jquery;
            var form = layui.form,
                layer = layui.layer;
            //监听提交
            form.on('submit(add)',
                function (data) {
                    data = data.field
                    $.post(infoEditUrl, {data}, (res) => {
                        if (res.status === config.success) {
                            layer.alert("编辑成功", {icon: 6}, function () {
                                xadmin.close();
                                xadmin.father_reload();
                            });
                        } else {
                            layer.msg(res.message, {icon: 2})
                        }
                    })
                    return false;
                });

        });
</script>
</body>

</html>